package com.bing.service.impl;

import com.bing.entity.Message;
import com.bing.entity.WebStatistics;
import com.bing.mapper.MessageMapper;
import com.bing.mapper.WebStatisticsMapper;
import com.bing.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IndexServiceImpl implements IndexService {

    @Autowired
     WebStatisticsMapper webStatisticsMapper;

    @Autowired
    MessageMapper messageMapper;

    @Override
    public void add(WebStatistics webStatistics) {
        webStatisticsMapper.insertSelective(webStatistics);
    }

    /**
     * 添加建议
     *
     * @author  Qing
     * @date 2018/6/5 23:56
     * @param  * @param message
     * @return boolean
     */
    @Override
    public boolean addMessager(Message message) {
        int result = messageMapper.insertSelective(message);
        return result>0;
    }

}
